Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WM-25: [DEV] 구글 로그인 콜백 처리 (페이지 리다이렉트) #8

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from

Conversation

Cyjin-jani
Copy link
Owner

목적

구글 로그인 시 콜백 처리를 합니다.

  • As-is: 구글 로그인 시 404 page로 redirect.
before.mp4
  • To-be: 구글 로그인 시 main page로 redirect.
Jan-18-2025.01-11-41.mp4

변경 사항

  • DB 스키마 변경 이후, dev.db와 migration.sql 등을 수정하였습니다.
  • gitignore 수정 (cursorignore 추가)
  • main 페이지 수정
    • users 제거 (불필요한 유저 목록 불러오지 않도록 제거), 메인 페이지 표기.
  • useUsers 수정
    • user 타입 변경
    • 파일 확장자 수정 (tsx -> ts) (왜 tsx로 되어있었을까요..;;;😅)
  • /login/google/callback page 추가
    • redirect 처리 등 추가

TODO (Optional)

  • 구글 로그인 시 실제 서비스의 서버 로직 (회원 여부 확인 등) 추가 필요

Followers (Optional)

@Cyjin-jani Cyjin-jani requested a review from ysm-dev January 17, 2025 16:24
@Cyjin-jani Cyjin-jani self-assigned this Jan 17, 2025
Copy link

linear bot commented Jan 17, 2025

Comment on lines +18 to +22
export default function Page() {
const router = useRouter();

useEffect(() => {
const handleAuth = async () => {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

구글 로그인 시, callback을 보여주지 않고 바로 main으로 넘기도록 시도해보았는데.. 잘 안되었습니다ㅠ 어떤 식으로 처리하는 것이 좋을 지 잘 모르겠습니다...🫠 빈 화면을 꼭 보여주어야 하는 것인지..

  • 현직에서 개발하고 있는 서비스는 login -> 구글 로그인 -> redirect_uri가 다시 login 페이지의 형태로 되는데요, (이후 로그인 성공 시 main 등으로 redirect) 이러한 형태도 별로인 것 같습니다... 콜백 페이지 처리를 어떻게 해야 가장 깔끔하게 처리할 수 있을 지 고민이 됩니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants